package com.collection.util;

import java.io.IOException;

import org.w3c.dom.Document;
import org.xml.sax.SAXException;

import com.sun.org.apache.xerces.internal.parsers.DOMParser;


public class HtmlToDocument {

    public Document htmlToDocument(String url) {
    	 DOMParser parser = new DOMParser(); 
         try { 
             parser.parse(url);
         } catch (SAXException e) { 
             e.printStackTrace(); 
         } catch (IOException e) { 
             e.printStackTrace(); 
         } 
         Document doc = parser.getDocument(); 
         return doc; 

    }
}
